#ifndef MSTRUCTS_H
#define MSTRUCTS_H
  
    //RS232 CFirebot::fbCOM2(COM2);
        
        struct FIREBOT_HEADER
        {
                        unsigned char command;
                        const char version[21];
        }; //fb_head = {"FIREBOT(802.11) v0.1"};
        
        struct FB_STATE
        {
               FIREBOT_HEADER fbHead;
               int sockets;
                
        } ;//fbState={{"FIREBOT(802.11) v0.1"}, 0};
        //FIREBOT_HEADER FB_STATE::fbHead = {"FIREBOT(802.11) v0.1"};
        //RS232 packet structure
        //byte pos:  0       1      2       3       4      5        6            
        //         ['F'][Ch0Duty][Ch1Duty][(OE)][Sol12V][Sol24V][Checksum]
        
        //[(OE)]    Function 
        // 0xAA   activate drivers (nOE = 0)
        // 0x55   deactivate drivers (nOE = 1)
        
        //Checksum in the sum of the bytes in pos 1 through 5
        
        struct RS232_PACKET
        {
               char cmd;
               char ch0duty;
               char ch1duty;
               char OE;
               char sol12V;
               char sol24V;
               char checksum;
        };
      // RS232_PACKET kill_pkt = {'F', 0, 0, 0x55, 0, 0, 0x55};//, rs232_pkt;
#endif
